import java.util.ArrayList;
import java.util.Collection;
import java.util.function.Consumer;

public class TestDemo {

    public static void main(String[] args) {
        Collection<Movie> movies=new ArrayList<>();
        Movie movie=new Movie();
        movies.add(new Movie("1",9.6,"good"));
        movies.add(new Movie("2",1.6,"bad"));
        movies.add(new Movie("3",4.6,"common"));

        for (Movie x:movies
             ) {
            System.out.println("id:"+x.getName());
            System.out.println("id:"+x.getScore());
            System.out.println("id:"+x.getActor());
        }
//            movies.forEach(new Consumer<Movie>() {
//                @Override
//                public void accept(Movie movie) {
//
//                }
//            });
        System.out.println("================================");
        movies.forEach(s->{
            System.out.println("id:"+s.getName());
            System.out.println("id:"+s.getScore());
            System.out.println("id:"+s.getActor());
        });

    }
}
